home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
stazsoftware.com
/
www.stazsoftware.com.tar
/
www.stazsoftware.com
/
futurebasic
/
sample-code
/
SwitchingToFB.sit
/
storage_bin
/
Utility FNs.incl
< prev
next >
Wrap
Text File
|
2002-07-31
|
1KB
|
87 lines
/*
a generic function that displays an error message
*/
LOCAL FN showError(msg AS STR255)
'~';
DIM x
CALL PARAMTEXT(msg,"","","")
x = FN NOTEALERT(_errorAlert,0)
END FN
/*
this function locates the next available (empty)
slot to be used as a window and file reference number.
*/
LOCAL FN getNextRef
'~';
DIM x,nextSlot
nextSlot = 0
FOR x = 1 TO _maxDBWinds
LONG IF gCurrentRecord(x) = 0
nextSlot = x
gCurrentRecord(x) = _zTrue
EXIT FN
END IF
NEXT
FN showError("You can't open any more windows.")
END FN = nextSlot
/*
get info from pref fields & buttons
*/
LOCAL FN capturePrefs
'~';
gPref.titleInfoFlags = 0//clear flags
LONG IF BUTTON(_prefIncludeDateBtn) = _kControlCheckBoxCheckedValue
gPref.titleInfoFlags += _includeDateMask
END IF
LONG IF BUTTON(_prefIncludePageNumberBtn) = _kControlCheckBoxCheckedValue
gPref.titleInfoFlags += _includePageNumber
END IF
gPref.reportTitle = EDIT$(_preftitleFld)
END FN
/*
display the splash alert window and
react to the button clicks
*/
LOCAL FN showSplash
'~';
DIM clickedButton
DO
clickedButton = FN ALERT(_splashAlert,0)
SELECT clickedButton
CASE 1//open
FN openStorageBin
CASE 2//new
FN createNewStorageBin
CASE 3//the picture
BEEP
END SELECT
UNTIL clickedButton = 1 or clickedButton = 2
END FN
/*
head 'e up. move 'em out
*/
LOCAL FN initProgram
'~';
FN createMenus
FN showSplash
END FN